using System;
using TelerikMvcGridCustomBindingHelper.Mapper;

namespace TelerikMvcGridCustomBindingHelper.Exceptions
{
    public class ValueResolverRegistrationException : Exception
    {
        public IValueResolver ValueResolver { get; private set; }

        public ValueResolverRegistrationException(IValueResolver valueResolver, string message)
            : base(message)
        {
            ValueResolver = valueResolver;
        }

        public ValueResolverRegistrationException(IValueResolver valueResolver)
            : base(string.Format("Could not regitry the ValueResolver: {0}", valueResolver))
        {
            ValueResolver = valueResolver;
        }
    }
}